﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

namespace DAO
{
    public class LoaiPhongDAO
    {
        public static DataTable LayDanhSachLoaiPhong()
        {
            DataTable dt = null;

            string sql = "Select MaLoaiPhong, TenLoaiPhong From LoaiPhong";
            sqlDataAccessHelper db = new sqlDataAccessHelper();
            dt = db.ExecuteQuery(sql);

            return dt;
        }

        public static DataTable LayDonGiaTheoLoaiPhong(int maLoaiPhong)
        {
            DataTable dt = null;

            string sql = "Select DonGia From LoaiPhong Where MaLoaiPhong="+maLoaiPhong;
            sqlDataAccessHelper db = new sqlDataAccessHelper();
            dt = db.ExecuteQuery(sql);

            return dt; 
        }
    }
}
